<%@ page language="java" import="java.util.*,code.bean.*" pageEncoding="UTF-8"%>
<%@ page import="code.util.ParamUtils" %>
<%@ page import="code.util.DateUtils" %>
<%@ page import="java.util.Calendar" %>
<%@ page import="java.util.List"%>
<%String path = request.getContextPath();
			String basePath = request.getScheme() + "://"
					+ request.getServerName() + ":" + request.getServerPort()
					+ path + "/";
%>

<%
	List codes = (List)ParamUtils.getObjectAttribute(request, "codes", null);
	String codedate = (String)ParamUtils.getObjectAttribute(request, "codedate", "");
	int i;
	Code code = new Code();
	String language = (String)ParamUtils.getObjectAttribute(request, "language", "");
 %>
<%
	User user = (User)ParamUtils.getObjectAttribute(request, "user", null);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>我的CodeSharer</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		
		<link href="css/s.css" rel="stylesheet" type="text/css" />
        <link href="css/comment_7.css" rel="stylesheet" type="text/css" />
		
	</head>

	<body>
<div id="head">
	<div class="hd">
		<div class="l tac wl2" style="width:720px;padding:3px;">
		<table width="100%"><tr>
			<td><div style="padding-left:15px;"><a href="servlet/ShowIndex1"><img src="images/pcslogo.gif"/></a></div></td>
			<td class="ce" style="font-size:14px">
			&nbsp;<a href="servlet/ShowSpace?userid=<%=ParamUtils.getParameter(request, "userid", "")%>" class="ce">主页</a>&nbsp;┊
			&nbsp;<a href="servlet/ShowCode?userid=<%=ParamUtils.getParameter(request, "userid", "")%>&blogdate=<%=DateUtils.format(Calendar.getInstance().getTime())%>" class="ce">我的代码</a>&nbsp;┊
			&nbsp;<a href="servlet/ShowShare?userid=<%=ParamUtils.getParameter(request, "userid", "")%>" class="ce">我的收藏</a>&nbsp;┊
			&nbsp;<a href="servlet/ShowProfile?userid=<%=ParamUtils.getParameter(request, "userid", "")%>" class="ce">用户信息</a>&nbsp;┊
			&nbsp;<a href="servlet/ManageCode?userid=<%=ParamUtils.getParameter(request, "userid", "")%>&cmd=add" class="ce">发布代码</a>&nbsp;┊
			&nbsp;<a href="../CodeSharer/advSearch.jsp?userid=<%=ParamUtils.getParameter(request, "userid", "")%>" class="ce">搜索</a>
			
			<%
				if(session.getAttribute("loginUser") != null && ((User)(session.getAttribute("loginUser"))).getId().equals(ParamUtils.getParameter(request, "userid", "")))
			    { 
					out.println("&nbsp;┊&nbsp;<a href=\"servlet/CodeList?userid=" + ParamUtils.getParameter(request, "userid", "") + "\" class=\"ce"+"\">代码管理</a>");
				    out.println("&nbsp;┊&nbsp;<a href=\"servlet/ShareList?userid=" + ParamUtils.getParameter(request, "userid", "") + "\" class=\"ce"+"\">收藏管理</a>");
				    out.println("&nbsp;┊&nbsp;<a href=\"servlet/DoLogout" + "\" class=\"ce"+"\">退出</a>");
				}
			%>
			</td>
		</tr></table>
		</div>
		<div align="right">
			<table>
			<tr>
			<td>
			    <div style="padding:4px;"></div>
				<form name="" action="servlet/SearchCodeByTitle?userid=<%=ParamUtils.getParameter(request, "userid", "")%>" method="post">
				<input type="text" name = "title1" value="" maxlength="15"/>
				<input type="submit" class="signinbtn1" value="搜标题"/>
				</form>
			</td>
			<td>
			&nbsp;&nbsp;&nbsp;&nbsp;
			<%if(session.getAttribute("loginUser") != null){ %>
			<a href="servlet/ShowSpace?userid=<%=
			((User)
			(session.getAttribute
			("loginUser"))).getId()
			%>" class="ce" style="font-size:16px">
			<%=((User)
			(session.getAttribute
			("loginUser"))).getNickName()%>
			</a>
			<%}%>
			</td>
			</tr>
			</table>
		</div>
		<div class="c"></div>
	</div>
</div>

<div id="main">

<DIV style="WIDTH: 230px" class="m1 wl2">

    <DIV class=m1t></DIV>
	    <div style="padding:15px 0 0 15px;">
		
		<div class="f13 ml20"><span style="font:bold 20px '黑体'; color:#D01E3B;">CodeSharer<br /></span> </div>
		    <div style="background:url(images/index_app.gif) repeat-x;width:190px;margin:20px auto 15px 7px;height:2px;"></div>

           <div class="l">
			     <div class="l50_s" ><img src="<%=user.getIcon()%>" width="100%" height="100%" /></div>
		   </div>
		   <div style="padding:5px;"></div>
		   <br/>
	       <div style="display:block;"><p class="l w80 tar c6">昵&nbsp;称：</p><p class="gw14"></p><p class="l"><%=user.getNickName()%></p><p class="c"></p>
		   </div>
		   
		   <div style="background:url(images/index_app.gif) repeat-x;width:190px;margin:20px auto 15px 7px;height:2px;"></div>
						
			<div id="text1div" class="f13 ml20"><img src="images/arrow_l.gif" align="absmiddle" />支持代码高亮显示</div>
			<div style="padding:2px;"></div>
			<div id="text1div" class="f13 ml20"><img src="images/arrow_l.gif" align="absmiddle" />支持代码版本控制</div>
			<div style="padding:2px;"></div>
			<div id="text1div" class="f13 ml20"><img src="images/arrow_l.gif" align="absmiddle" />支持代码分享、收藏、评论</div>
			
			<div style="background:url(images/index_app.gif) repeat-x;width:190px;margin:20px auto 15px 7px;height:2px;"></div>
			
		    <div class="mt15" style="margin:0px 0px 5px 15px;font: 18px '黑体'; color:#D01E3B;">最新更新:
				   <div style="margin-top:0px;">
                     <div class="l f13 c6" style="margin:0px 0px 0px 25px ! important;*margin:0px 0px 0px 25px;">   
					    <jsp:include page="common/spacelist.jsp">
					        <jsp:param name="usersType" value="newusers"/>
					        <jsp:param name="listName" value="最受欢迎"/>
					    </jsp:include>
					 </div>
				   </div>
			</div>
			
			<div style="background:url(images/index_app.gif) repeat-x;width:190px;margin:20px auto 15px 7px;height:2px;"></div>
			
			<div class="mt15" style="margin:0px 0px 5px 15px;font: 18px '黑体'; color:#D01E3B;">最受欢迎:
				   <div style="margin-top:0px;">
                     <div class="l f13 c6" style="margin:0px 0px 0px 25px ! important;*margin:0px 0px 0px 25px;">   
					    <jsp:include page="common/spacelist.jsp">
					        <jsp:param name="usersType" value="hotusers"/>
					        <jsp:param name="listName" value="最受欢迎"/>
					    </jsp:include>
					    <div style="padding:5px;"></div>
					 </div>
				   </div>
			</div>
			
		</div>
 </DIV>

	<div class="m2 wr2" style="width:770px;">
	  <div id="r2s_2">
		<div id="r2l" style="width:700px;">
			<div style="padding:10px;"></div>
			<div><%@ include file="./partCode.inc" %><br></div>
		</div>
	  </div>
	</div>
	
</div>
	
	<div id="b">
	<div class="b1"><a href="#" class="c6" target="_blank">关于我们</a><span>┊</span><a href="/s/contact.html" class="c6" target="_blank">联系方式</a><span>┊</span><a href="/t/feedback.html" class="c6" target="_blank">意见反馈</a><span>┊</span><a href="/s/help.html" class="c6" target="_blank">帮助中心</a>　 &nbsp;<a class=c6 href=http://www.miibeian.gov.cn target=_blank>NENU</a> <img src="images/gs.gif" width="15" align="absmiddle" />&nbsp;<img src="images/jc.gif" width="17" align="absmiddle" /></div>

</div>
	
	</body>
</html>
